home *** CD-ROM | disk | FTP | other *** search
/ Leonardo the Inventor / Leonardo The Inventor (93026)(Broderbund)(Riverdeep)(2004).iso / LEOWINMV / TIMELINE.DIR / 00012_Script_TIMELINE MOVEMENTS 1 < prev    next >
Text File  |  1996-03-31  |  2KB  |  60 lines

  1. -- -----------------------------------------------------------
  2. -- Handler goForwardInTime takes the user to the next frame
  3. -- of the time period.  This assumes that frames are ordered
  4. -- such that frame F contains the dates and the events
  5. -- that occured and frame (F+1) contains the dates only.
  6. -- (Similarly, frame (F+2) contains the dates and events
  7. -- of the next screen, frame (F+3) contains only the dates
  8. -- of the next screen...)
  9.  
  10. on goForwardInTime newFrame
  11.   global thumb,firstTimeScreenframe,framesBetweenScreens
  12.   if voidP(newFrame) then set newFrame = the frame + 2
  13.   --  puppetSound "sound"
  14.   --  updateStage
  15.   --  hideTimePeriods -- if it appears on the stage
  16.   set currentFrame = the frame
  17.   go currentFrame + 1 -- current frame with just dates
  18.   puppetTransition 11, 4, 16 -- Push Left
  19.   puppetSound "transitionSound"
  20.   go currentFrame + 3 -- dates of next screen in period
  21.   go newFrame -- dates and events of next screen
  22.   
  23.   updateThumb thumb,firstTimeScreenframe,framesBetweenScreens
  24. end
  25.  
  26. -- -----------------------------------------------------------
  27. -- Handler goBackInTime takes the user to the next frame
  28. -- of the time period.  This assumes that frames are ordered
  29. -- such that frame F contains the dates and the events
  30. -- that occured and frame (F+1) contains the dates only.
  31. -- (Similarly, frame (F+2) contains the dates and events
  32. -- of the next screen, frame (F+3) contains only the dates
  33. -- of the next screen...)
  34.  
  35. on goBackInTime newFrame
  36.   global thumb,firstTimeScreenframe,framesBetweenScreens
  37.   if voidP(newFrame) then set newFrame = the frame - 2
  38.   --  puppetSound "sound"
  39.   --  updateStage
  40.   --  hideTimePeriods -- if it appears on the stage
  41.   set currentFrame = the frame
  42.   go currentFrame + 1 -- current frame with just dates
  43.   puppetTransition 12, 4, 16 -- Push Right
  44.   puppetSound "transitionSound"
  45.   go currentFrame - 1 -- dates of previous screen in period
  46.   go newFrame -- dates and events of previous screen
  47.   
  48.   updateThumb thumb,firstTimeScreenframe,framesBetweenScreens
  49.   
  50. end
  51.  
  52.  
  53. -- snap thumb to position
  54. on updateThumb thumb,firstTimeScreenframe,framesBetweenScreens
  55.   set currentScreenNum = (the frame - firstTimeScreenframe) / framesBetweenScreens + 1
  56.   set newThumbPos = getThumbPosFromScreenNum(currentScreenNum)
  57.   updateLocHOfItem thumb,newThumbPos
  58.   
  59. end
  60.